home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagn_r.zip / NUMBERS.SWG / 0027_Get HIGH order of WORD.pas < prev    next >
Pascal/Delphi Source File  |  1993-09-26  |  674b  |  16 lines

  1. {*****************************************************************************
  2.  * Function ...... wHi()
  3.  * Purpose ....... Return the High order word from a longint (double word)
  4.  * Parameters .... n          LONGINT to retrieve high word from
  5.  * Returns ....... High word from n
  6.  * Notes ......... HI only returns the HIgh byte from a word.  I needed
  7.  *                 something that returned the high WORD from a LONGINT.
  8.  * Author ........ Martin Richardson
  9.  * Date .......... October 9, 1992
  10.  *****************************************************************************}
  11. FUNCTION wHi( n: LONGINT ): WORD; ASSEMBLER;
  12. ASM
  13.    MOV  AX, WORD PTR n[2]
  14. END;
  15.  
  16.